package com.ruoyi.mp.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 变更业务类型
 */
@AllArgsConstructor
@Getter
public enum MpAricleStatusEnum {
    UN_CREATED(0,"待生成"),
    UN_BEAUTY(1,"待美化"),
    UN_UP(2,"待上传"),
    UN_PUBLISH(3,"待发布"),
    PUBLISHED(4,"已发布"),
    ;
    private Integer type;
    private String desc;

    public static MpAricleStatusEnum getByType(Integer type){
        return Arrays.stream(values()).filter(c-> c.getType().equals(type)).findFirst().orElse(null);
    }

}
